﻿using Basic.HrRemoteModel.EmpPost;
using Basic.HrRemoteModel.EmpPost.Model;
using Basic.HrService.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.HrService.RpcEvent
{
    internal class EmpPostEvent : IRpcApiService
    {
        private readonly IEmpPostService _Service;

        public EmpPostEvent ( IEmpPostService service )
        {
            this._Service = service;
        }

        public long AddEmpPost ( AddEmpPost obj )
        {
            return this._Service.Add(obj.Datum);
        }
        public void DeleteEmpPost ( DeleteEmpPost obj )
        {
            this._Service.Delete(obj.Id);
        }
        public EmpPostData GetEmpPost ( GetEmpPost obj )
        {
            return this._Service.Get(obj.Id);
        }
        public EmpPostDatum[] GetEmpPostList ( GetEmpPostList obj )
        {
            return this._Service.Gets(obj.EmpId, obj.CompanyId);
        }
    }
}
